<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<title>Flotr: Basic Stacked Bars Example</title>
		<link rel="stylesheet" href="style.css" type="text/css" />
		<script type="text/javascript" src="../lib/yepnope.js"></script>
	</head>
	<body>
		
		<!-- ad -->
		
		<div id="wrapper">
			<h1></h1>
			<div id="container" style="width:600px;height:300px;"></div>
			<h2>Example</h2>
			<p>This example shows how to configure the legend. Note I also added a <code>style</code> tag 
			(between the <code>header</code> tags) to add a 2px border to the legend container. I could also
			style other legend elements. The elements get the the following css classes when they're generated:</p>
			<ul>
				<li>flotr-legend &rarr; Legend wrapper element.</li>
				<li>flotr-legend-bg &rarr; Legend background element.</li>
				<li>flotr-legend-color-box &rarr; Legend color box.</li>
				<li>flotr-legend-label &rarr; Legend label.</li>
			</ul>
			<p>Finished? Go to the example <a href="index.html" title="Flotr Example Index Page">index page</a>, play with the <a href="../../playground/index.html" title="Flotr playground">playground</a> or read the <a href="http://www.solutoire.com/flotr/docs/" title="Flotr Documentation Pages">Flotr Documentation Pages</a>.</p>
			<h2>The Code</h2>
			<pre id="code-view"><code class="javascript"></code></pre>
			<div id="footer">Copyright &copy; 2008 Bas Wenneker, <a href="http://www.solutoire.com">solutoire.com</a></div>
		</div>	
		
		<!-- ad -->
			
		<script type="text/javascript">
			function example(){

                var container = document.getElementById('container');

				/**
				 * Fill series.
				 */
				var d1 = [], d2 = [], d3 = [];
				for (i = -10; i < 10; i++) {
				  d1.push([i, Math.random()]);
				  d2.push([i, Math.random()]);
				  d3.push([i, Math.random()]);
				}
			
				/**
				 * Draw the graph.
				 */
			    var f = Flotr.draw(container,[
						{data:d1, label:'Serie 1'},
						{data:d2, label:'Serie 2'},
						{data:d3, label:'Serie 3'}
					],{
						legend:{
							backgroundColor: '#D2E8FF' // => a light blue background color.
						},
						bars: {
						  show: true,
              stacked: true,
              //horizontal: true,
              barWidth: 0.6
						},
						grid: {
						  verticalLines: false
						},
						spreadsheet:{show: true}
					}
				);
			};			
		</script>
		
		<!-- analytics -->
		
	</body>
  <script type="text/javascript" src="includes.js"></script>
</html>
